package com.plian.system.controller.transfer;

import com.plian.system.config.AppKeySign;
import com.plian.system.dto.transfer.DataPlatSign;
import com.plian.system.entity.qg.guarantee.PropertyGuaranteeApply;
import com.plian.system.model.R;
import com.plian.system.model.token.PassToken;
import com.plian.system.service.transfer.IPropertyGuaranteeService;
import com.plian.system.vo.qg.guarantee.PropertyGuaranteeExecuteVO;
import io.swagger.annotations.Api;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: Take-off
 * @Description: TODO 企业担保-输出
 * @Date: 2022/11/8 4:14 PM
 * @Version: 1.0
 **/
@RestController
@RequestMapping("api/propertyGuarantee")
@AllArgsConstructor
@Api(value = "企业担保-输出", tags = "企业担保输出")
@Slf4j
public class PropertyGuaranteeController {

    private IPropertyGuaranteeService propertyGuaranteeService;


    /**
     * 提供时间段内的企业担保申请-数据接口
     * @param dataPlatSign
     */
    @PostMapping(value = "/guarentee-apply")
    @PassToken
    @AppKeySign
    public R<List<PropertyGuaranteeApply>> getPropertyGuaranteeApply(@RequestBody DataPlatSign dataPlatSign){
        return propertyGuaranteeService.getPropertyGuaranteeApply(dataPlatSign);
    }

    /**
     * 提供时间段内的企业担保申请-数据接口
     * @param dataPlatSign
     */
    @PostMapping(value = "/guarentee-execute")
    @PassToken
    @AppKeySign
    public R<List<PropertyGuaranteeExecuteVO>> getPropertyGuaranteeExecute(@RequestBody DataPlatSign dataPlatSign){
        return propertyGuaranteeService.getPropertyGuaranteeExecute(dataPlatSign);
    }

}
